package com.ciaojian.core.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ciaojian.core.model.dy.DyOrder;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2022-12-28
 */
public interface DyOrderMapper extends BaseMapper<DyOrder> {

    @Select("select status from d_dy_order where dy_order_id=#{orderId}")
    int getStatus(String orderId);


    @Select("select id\n" +
            " from d_dy_order where user_id in(\n" +
            "SELECT user_id FROM d_order where pay_time like '2023%' and coupon_id =469 and user_id !=82998\n" +
            ")and status in(4)")
    List<Integer> dspk();
}
